package w17;

public class Student {
	private String name;
	private int age;
	public void setName(String name) {
		this.name = name;//this就是调用实例方法setName的那个对象
	}
	public void setAge(int age) {
		this.age = age;
	}
	public void showMessage() {
		System.out.println("姓名："+name+",年龄："+age+"岁~");//在类的内容，可以访问私有成员
	}
}
